﻿<Window xmlns:my="clr-namespace:PAM.Core;assembly=PAM.Core"  x:Class="PAM.MainGraphWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:TaskbarNotification="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" xmlns:local="clr-namespace:PAM.Views" Title="PAM" Height="598" Width="694" Icon="/PAM;component/Resources/App.ico"
		Loaded="FormLoaded">
	<DockPanel LastChildFill="True">
		<TaskbarNotification:TaskbarIcon 
			x:Name="taskbarIcon" 
			VerticalAlignment="Top" 
			ToolTipText="Hello world tooltip" 
			Visibility="Visible" 
			IconSource="Resources\NotificationAreaIcon.ico" MenuActivation="All">
			<TaskbarNotification:TaskbarIcon.ContextMenu>
				<ContextMenu>
					
					<MenuItem Header="Open" Click="OnMenuItemOpenClick" />
					<MenuItem Header="Export" Click="OnMenuItemExportClick"/>
					<Separator/>
					<MenuItem Header="Settings..." Click="OnMenuItemSettingsClick"/>
					<Separator/>
					<MenuItem Header="About" Click="OnMenuItemAboutClick"/>
					<MenuItem Header="Check new version" Click="OnMenuItemCheckNewVersionClick"/>
					<Separator/>
					<MenuItem Header="Exit" Click="OnMenuItemExitClick" />
				</ContextMenu>
			</TaskbarNotification:TaskbarIcon.ContextMenu>
			<!--<TaskbarNotification:TaskbarIcon.TrayPopup>-->
				<!-- the control will be put into a popup with an explicit DataContext -->
				<!--<local:NewVersionPopupView />-->
			<!--</TaskbarNotification:TaskbarIcon.TrayPopup>-->

			<TaskbarNotification:TaskbarIcon.TrayToolTip>
				<!-- the control will be put into a tooltip with an explicit DataContext -->
				<local:ToolTipView/>
			</TaskbarNotification:TaskbarIcon.TrayToolTip>

		</TaskbarNotification:TaskbarIcon>
	
		<Border DockPanel.Dock="Top" CornerRadius="10" Margin="5" Padding="5" Background="#5296E296" BorderThickness="1" >
			<Expander Header="Currently running application" IsExpanded="True" ExpandDirection="Down">
				<StackPanel Orientation="Horizontal" Name="CurrentApp" Margin="0,10,0,0">
					<Image Name="appIcon" Stretch="None" StretchDirection="DownOnly"  Source="{Binding Path=CurrentApplicationIcon}"/>
					<StackPanel>
						<StackPanel Orientation="Horizontal">
							<Label>Application name :</Label>
							<Label Name="appNameLabel" Content="{Binding Path=CurrentApplicationName}"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal">
							<Label>Path :</Label>
							<Label Name="appPathLabel" Content="{Binding Path=CurrentApplicationPath}"/>
						</StackPanel>
						<StackPanel Orientation="Horizontal">
							<Label>Usage time :</Label>
							<Label Name="appUsage" Content="{Binding CurrentApplicationTotalUsageTime}"/>
						</StackPanel>
					</StackPanel>
					
				</StackPanel>
			</Expander>
		</Border>
		<Border  CornerRadius="10" Margin="5" Padding="5" Background="#5296E296" BorderThickness="1">
			<DockPanel LastChildFill="True">
				<StackPanel DockPanel.Dock="Top">
					<Label>Applications history</Label>
					
					<StackPanel Orientation="Horizontal">
						<Button Content="sort apps by usage ascending" Height="23" Name="button1" Click="button1_Click" />
						<Button Content="sort apps by usage descenging" Height="23" Name="button2" Click="button2_Click" />
					</StackPanel>
				</StackPanel>
				
				<my:TreeViewer  Name="appsTree" Margin="0,10,0,0"/>
			</DockPanel>
		</Border>
	</DockPanel>
</Window>